import request from '@/utils/request'

// 获取所有员工
export function getEmployeesList(params) {
  return request({
    url: '/sys/user',
    params
  })
}
// 删除员工
export function delEmployees(id) {
  return request({
    url: `/sys/user/${id}`,
    method: 'delete'
  })
}
// 新增员工
export function addEmployee(data) {
  return request({
    url: '/sys/user',
    method: 'post',
    data
  })
}
// 批量导入员工
export function importEmployee(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}
// 获取员工 详情
export function getUserDital(data) {
  return request({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}
// 根据id获取指定员工信息
export function getUserDetailById(id) {
  return request({
    url: `/sys/user/${id}`
  })
}
// 更改员工信息
export function setUserDetailById(id, data) {
  return request({
    url: `/sys/user/${id}`,
    method: 'PUT',
    data
  })
}

